package www.test.tag;



import java.io.IOException;

import javax.servlet.jsp.JspException;

import javax.servlet.jsp.tagext.BodyContent;
import javax.servlet.jsp.tagext.BodyTagSupport;

public class LowCase extends BodyTagSupport
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	
	@Override
	public int doStartTag() throws JspException
	{
		return BodyTagSupport.EVAL_BODY_BUFFERED;
	}
	
	@Override
	public int doEndTag() throws JspException
	{
		BodyContent ct =this.getBodyContent();
		String content = ct.getString();
		content = content.toLowerCase();
		try
		{
			this.pageContext.getOut().write(content);
		}
		catch (IOException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return BodyTagSupport.EVAL_BODY_INCLUDE;
		//return TagSupport.SKIP_PAGE;接下来的不执行
	}

	
}
